package com.loong.common.enumerate;

/**
 * @Description:
 * @Author: hzp
 * @Date: 2020-11-7 14:18
 */
public enum ShopType {

    //超市，生鲜，商城，外卖，地产，商务
    Supermarket(1,"supermarket","超市"),
    Fresh(2,"fresh","生鲜"),
    Shopping_Mall(3,"shopping_mall","商城"),
    Take_Out(4,"take_out","外卖"),
    Property(5,"property","地产"),
    Business(6,"business","商务"),
    UnKnown(7, "unknown", "未知"),
    ;

    private int code;
    private String name;
    private String desc;

    ShopType(int code, String name, String desc) {
        this.code = code;
        this.name = name;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }


    public static ShopType getShopType(int shopType) {
        ShopType shopTypeEnum;
        switch (shopType) {
            case 1:
                shopTypeEnum = ShopType.Supermarket;
                break;
            case 2:
                shopTypeEnum = ShopType.Fresh;
                break;
            case 3:
                shopTypeEnum = ShopType.Shopping_Mall;
                break;
            case 4:
                shopTypeEnum = ShopType.Take_Out;
                break;
            case 5:
                shopTypeEnum = ShopType.Property;
                break;
            case 6:
                shopTypeEnum = ShopType.Business;
                break;
            default:
                shopTypeEnum = ShopType.UnKnown;
                break;
        }
        return shopTypeEnum;
    }

}
